<?php


namespace App\Http\Controllers\OpenShop\Feishu;

use App\Http\Controllers\BaseController;
use App\Service\OpenShop\Feishu\MissionTemplateService;
use Illuminate\Http\Request;

class MissionTemplateController extends BaseController
{
    public function lists()
    {
        return $this->success(['lists' => (new MissionTemplateService())->lists()]);
    }

    public function detail(Request $request, int $id)
    {
        return $this->success(['detail' => (new MissionTemplateService())->detail($id)]);
    }

    public function edit(Request $request, int $id)
    {
        (new MissionTemplateService())->edit($request->all(), $id);

        return $this->success();
    }
}
